package com.java.testdemo2;

public class TestDriver {

	public static void main(String[] args) {
		// test01();
		// test02();
		test03();
	}

	public static void test01() {

		// static可以通过类名直接调用
		Vehicle.showMe();
		// 成员方法的调用只有通过new
		Vehicle ve = new Vehicle();
		ve.showMe();
		// 静态方法可以重载，可以继承
		Car.showMe();
		System.out.println("==========================");
	}

	public static void test02() {

		Vehicle ve0 = new Vehicle();
		ve0.setVehicleName("交通工具");
		ve0.setVehicleSpeed(100.2);
		ve0.showMe0();
		Vehicle ve1 = new Vehicle();
		ve1.showMe0();
	}

	public static void test03() {
		// 读取Vehicle的静态属性类
		String str = Vehicle.vehicleName;
		Vehicle ve0 = new Vehicle();
		ve0.setVehicleName("交通工具");
		ve0.setVehicleSpeed(100.2);
		ve0.showMe0();
		Vehicle ve1 = new Vehicle();
		ve1.showMe0();
	}
}
